<include file="__THEME__/header" />
<link rel="stylesheet" href="../Public/bug.css" type="text/css" media="screen" charset="utf-8" />
<div class="bug_content">
  <!-- 内容 begin  -->
  <div class="bug_main">
    <!-- 画布 begin  -->
    <include file="../Public/nav_top" />
    <div class="bug_LogList" style="margin-top:10px;">
      <!-- Bug 内容开始 -->
      <div class="bug_issue" >
        <div class="bug_tit"><span class="bug_del">
          <php>if($mid==$buginfo['uid'] OR $isbugadmin){</php>
          <a href="{:U('bug/bug/edit','id='.$buginfo[id])}">编辑</a> <a href="{:U('bug/bug/dodel','id='.$buginfo[id])}">删除</a>
          <php>}</php>
          </span>{$buginfo.state|getStateInfo} </div>
        <div class="bug_list">
          <div class="bug_mt5"><span class="bug_right">
            <PHP>if($_GET['type']!='r' && $isbugadmin){</PHP>
            <input type="button" onclick="dotype(1)" class="bug_btn_b" value="指派" />
            &nbsp;
            <input type="button" onclick="dotype(2)" class="bug_btn_b" value="处理" />
            <PHP>}</PHP>
            </span><strong class="bug_lh22 bug_f16">{$buginfo.title}</strong>
            <p><a href="{:U('space/view/index','uid='.$buginfo[uid])}">{$buginfo.uname}</a> <span class="bug_clor">{$buginfo.cTime|friendlyDate}</span></p>
          </div>
          <div style="padding:0 0 20px 0px;" class="blog_con" id="issue">{$buginfo.content|stripslashes}</div>
          <div style="width:100%; padding:5px 0;">
            <div style="width:25%;" class="bug_left bug_clor3"><strong>版本号：</strong>{$buginfo.edition|getEditionName}</div>
            <div style="width:25%;" class="bug_left bug_clor3"><strong>类型：</strong>{$buginfo.catid|getCategoryName}</div>
            <div style="width:25%;" class="bug_left bug_clor3"><strong>浏览器：</strong>{$buginfo.browser}</div>
            <div style="width:25%;" class="bug_left bug_clor3"><strong>安装环境：</strong>{$buginfo.setting}</div>
            <div class="bug_c"></div>
          </div>
          <!--  以前推荐的地方 -->
        </div>
      </div>
      
      <PHP>if($buginfo['reply']){</PHP>
      <div class="bug_det_list">
        <div class="bug_tit">官方处理</div>
        <div style="padding:0 10px;"  id="solution">
          <div class="lh180" id="blog_con">{$buginfo.reply}</div>
          <!--          <neq name ="attach" value="">
            <div class="adjunct_list">
              <h2>附件:</h2>
              <volist name ="attach" id="vo"></volist>
              <p class="cGray2"><a href="__TS__/Attach/index/id/{$vo['id']}/uid/{$vo.userId}">{$vo['name']}</a></p>
              </volist>
            </div>
          </neq>-->
        </div>
      </div>
      <PHP>}</PHP>
      <div class="bug_det_list">
        <div class="bug_tit">官方操作日志</div>
        <ul>
          <volist id="vo" name="bugbug_LogList">
            <li><a href="__TS__/space/{$vo.uid}">{$vo.uid|getUserName}</a> {$vo.content} {$vo.cTime|friendlyDate}</li>
          </volist>
        </ul>
      </div>
      <div style="margin-top:10px;">
        <PHP>if($_GET['type']=='r'){</PHP>
        <form action="{:U('bug/bug/dotype')}" method="POST">
          <input type="hidden" name="id" value="{$buginfo.id}">
          <input type="hidden" name="type" value="sopite">
          <table align="left" width="100%" style="line-height: 35px;" cellpadding="0" cellspacing="0" border="0">
            <tr>
              <td align="right" valign="top" >内容：</td>
              <td align="left" style="padding-top:10px;"> {:W("Edit",array('content'=>$buginfo['reply']))}</td>
            </tr>
<!--            <tr height="40">
              <td align="right" valign="middle">附件：</td>
              <td align="left" valign="middle"><neq name ="attach" value="">
                  <volist name ="attach" id="vo">
                    <p id="attach_{$vo.id}"><a onclick='$("#attach_"+{$vo.id}).remove()' href="javascript:void(0)" class="attach2771">[删除]</a> <span class="attach2771">{$vo['name']}</span>
                      <input class="bug_input_b" type="hidden" name="attach[]" value="{$vo['id']}|{$vo['name']}">
                    </p>
                  </volist>
                </neq>
                {:W( 'UploadAttach',array( 'uid'=>$mid , 'type'=>'bug' , 'callback'=>'attach_upload_success') )}</td>
            </tr>-->
            <tr>
              <td align="right" valign="middle">状态：</td>
              <td align="left"><select class="bug_input_b" name="state">
                  <php>foreach(getStateInfo() as $key=>$val){</php>
                  <php>$selected = ($key==3)?'selected':''</php>
                  <option value="{$key}" {$selected}>{$val}</option>
                  <php>}</php>
                </select></td>
            </tr>
            <tr>
              <td align="right" valign="top" >&nbsp;</td>
              <td align="left" style="padding-top:10px;"><input type="submit" class="bug_btn_b" value="提 交" />
                <input type="button" class="bug_btn_b" value="返 回" onclick="javascript:history.back( -1 )" /></td>
            </tr>
          </table>
        </form>
      </div>
      <PHP>}else{</PHP>
      <!--      {:W('Comment',array( 'type'=>'bug','appid'=>$buginfo['id'],'mid'=>$uid,"face"=>getUserFace( $mid ),'role'=>'' ))}-->
      <PHP>}</PHP>
    </div>
    </div>
  </div>
  <!-- 画布 end  -->
  <div class="c"></div>
</div>
<!-- 内容 end -->
<script>

function photo_size(name){
	$(name+" img").each(function(){
		var width = 400;
		var height = 400;
		var image = $(this);
		if (image.width() > image.height()){
		   if(image.width()>width){
			image.width(width);
			image.height(width/image.width()*image.height());
		   }
		}
		else{
		   if(image.height()>height){
			image.height(height);
			image.width(height/image.height()*image.width());
		   }
		}
		  image.addClass('hand');
		  image.bind('click',function(){
                   window.open(image.attr('src'),'_blank');
                });
	});
}

photo_size('#issue');
photo_size('#solution');

function dotype(val){
	if(val=='1'){
		$.tbox.popBox(getCooptContent(),'选择指派人员');
	}else{
		location.href = "{:U('bug/bug/view',array('type'=>'r','id'=>$buginfo[id]))}";
	}
}

function getCooptContent(){
var html = '<div class="bug_pop" id="pop_network"><form action="'+"{:U('bug/bug/dotype')}"+'" method="post"><input type="hidden" name="type" value="coopt"><input type ="hidden" name="id" value="{$buginfo.id}">'+
		   '<div>'+
		   <PHP>foreach($adminlist as $val){
		       echo "\'<li><input type=checkbox name=userId[] value=".$val."> ".getUserName($val)."\</li>'+";
		   }</PHP>
		   '<div style="text-align:center">'+
           '<input name="input" type="submit" class="btn_b bug_mr5" value="确 定"/>'+
           '<input name="input2" type="button" class="btn_b " value="取 消" onclick="$.tbox.close();" /></div>'+
           '</form></div>';
	return html;
}
function commentSuccess(json){
    //计数
    $.post("{:U('bug/bug/commentSuccess')}",{
        data:json
    },function(result){
        
    });
}
</script>
<style>
.ulist{
	height:480px;
}
</style>
<include    file="__THEME__/footer" /> 